import axios from "@/http/request.js";

//陪玩接口
const playmateApi = {
  // login(data) {
  //   return axios({
  //     method: "post",
  //     url: "/playmate/login",
  //     data,
  //   });
  // },

  // 2222

  login(data) {
    return axios({
      method: "post",
      url: "/playmate/login",
      data,
    });
  },
  //查询全部游戏类型
  getAllGameType(data) {
    return axios({
      method: "post",
      url: "/home/getGameType",
      data,
    });
  },
  //查询全部商品
  getGoodsList(data) {
    return axios({
      method: "post",
      url: "/home/getOrderList",
      data,
    });
  },
  //查询全部地址
  getAllAddress(data) {
    return axios({
      method: "post",
      url: "/boss/getAddress",
      data,
      timeout: 30000, // 设置30秒超时
    });
  },

  uploadImg(data) {
    return axios({
      method: "post",
      url: "/boss/uploadImg",
      data,
    });
  }, //没写

  //注册
  register(data) {
    return axios({
      method: "post",
      url: "/boss/register",
      data,
    }); //没写
  },
  //登录
  login(data) {
    return axios({
      method: "post",
      url: "/playmate/login",
      data,
    });
  },
  //退出登录
  logout(data) {
    return axios({
      method: "post",
      url: "/playmate/logout",
      data,
    });
  },
  //修改个人信息
  updateUser(data) {
    return axios({
      method: "post",
      url: "/playmate/updateUser",
      data,
    });
  },
  //修改密码
  modifyPassword(data) {
    return axios({
      method: "post",
      url: "/playmate/modifyPassword",
      data,
    });
  },
  //获取所有陪玩
  getAllPlaymates(data) {
    return axios({
      method: "post",
      url: "/playmate/getAllPlaymates",
      data,
    });
  },
};
export default playmateApi;
